//
//  UIFont+Extension.swift
//  SmartEyeForDoctor
//
//  Created by QDSG on 2021/4/20.
//

import UIKit

extension UIFont {
    static func regular(_ size: CGFloat) -> UIFont {
        guard let font = UIFont(name: "PingFangSC-Regular", size: size) else {
            return UIFont.systemFont(ofSize: size)
        }
        return font
    }
    
    static func medium(_ size: CGFloat) -> UIFont {
        guard let font = UIFont(name: "PingFangSC-Medium", size: size) else {
            return UIFont.boldSystemFont(ofSize: size)
        }
        return font
    }
    
    static func bold(_ size: CGFloat) -> UIFont {
        guard let font = UIFont(name: "PingFangSC-Semibold", size: size) else { return
            UIFont.boldSystemFont(ofSize: size)
        }
        return font
    }
}

